<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>v-if-v-show</title>
    <script src="../js/vue2.js"></script>
</head>
<body>
    <div id="app">
        年龄<input type="text" v-model="age">经判定，为:
        <span v-if="age <= 35">年轻人（35岁以下）</span>
        <span v-else-if="age > 35 && age < 60" >中年人（35-60岁）</span>
        <span v-else>老年人（60岁及以上）</span>
        <br><br>

        年龄<input type="text" v-model="age">经判定，为:
        <span v-show="age <= 35">年轻人（35岁以下）</span>
        <span v-show="age > 35 && age < 60" >中年人（35-60岁）</span>
        <span v-show>老年人（60岁及以上）</span>
        <br><br>
    </div>
</body>

<script>
    new Vue({
        el:"#app",
        data: {
            age: 20
        },

        methods: {

        }
    })
</script>
</html>